<?php
/*
 * Created on Nov 7, 2007
 *
 * Continut:  
 * 
 */
 /*require_once("include/classes/xmlDocument.class.php");
 require_once("include/classes/xmlChapter.class.php");
 require_once("include/classes/xmlBasicElements.class.php");*/
 
 //$newInst=xmlChapter::loadStruct('documente/testtest1.xml');
 //$newDoc=new xmlDocument('beta3','..//xmlDocument/documente/betas');
 //$newChap=$newDoc->createNewChapter('ch1test1', 'ch1test1');
 //$newChap->createNewParagraph('paraTest','paragraf test 2');
 //$newChap=$newDoc->createNewChapter('c1beta3','c1beta3');
 //$newChap->createNewParagraph('paraTest','paragraf test 2');
 //$newDoc->reloadChapter($newChap->chapterId, $newChap->chapterPath);
 
 
 //$parser = xml_parser_create();
 //xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8");
 
/* $xmlDoc = new DOMDocument();
 $xmlDoc->load("documente/betas/beta3.xml");
 print $xmlDoc->saveXML();*/

//echo phpinfo();
//	echo date("D, d M(m) Y, G:i ", 1200146420);

	//$proc=new XSLTProcessor();
	
	//$xsl=new DOMDocument();
	//$xsl->load('include/xsl/processingInstructions.xsl');
	//$proc->importStylesheet($xsl);
	
	//$dom=new DOMDocument();
	//$dom->load('documente/teste2/ch1t.xml');
	
	//print $proc->transformToXml($dom);
	//$proc->transformToXml($dom);
 	//ob_start();
 	//$proc->transformToUri($dom, "testeXSLt.php");
 	//$proc->transformToUri($dom, 'php://output');
 	//ob_get_flush();
	//include('testeXSLt.php');
	
	//xml_set_processing_instruction_handler();
	
//	$newDoc=new xmlDocument('teste2','..//xmlDocument/documente/teste2');
//	echo("+++++");
// 	$newChap=$newDoc->createNewChapter('pampam', 'pampam');
 	
 	//$newChap->updateParagraph('p1',"blaaaahhhhh");
 
 	///echo("dfgsdfg");
 	
 	//$doc=new xmlDocument('teste2', '');	
 	//echo $_SESSION['docName']."++".$_SESSION['docPath'];
// 	$chapters=$newDoc->getAllChapters();
// 	echo("--------");
// 	var_dump($chapters);
//	echo $_SERVER['SCRIPT_FILENAME'];

//	require_once("include/classes/xmlChapterComment.class.php");
	
//	$comment=new xmlChapterComment('sdfasd', '..//xmlDocument/documente/teste2');
	//var_dump($comment->docPath);
//	$comment->updateComment('cmt1', 'mau', 'p1', '12 02 08', 'ceva text+ ceva adaugiri');

///	phpinfo();
/*	require_once 'include/classes/process.class.php';
	require_once 'include/classes/session.class.php';
	require_once 'include/classes/database.php';
	
	$db=new MySQLDB();
	$ses=new Session(& $db);
	
	$_POST['procXHR']=1;
	
	$test=new Process($ses, $db);	
	var_dump($test);*/
	//define('FPDF_FONTPATH','include/font/');
	require_once 'include/classes/pdfPrinter.class.php';

	$pdf=new pdfPrinter();
	$title="Lorem ipsum dolor sit amet";
	$text="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent placerat arcu nec est. Vivamus lacus. Aliquam et risus. Morbi hendrerit sollicitudin purus. Mauris ac tellus vitae libero pharetra luctus. Nunc interdum porta massa. Suspendisse bibendum, ipsum vitae ornare eleifend, lacus felis convallis mauris, et porttitor turpis augue eget mi. Sed purus diam, bibendum in, tempus adipiscing, ultricies eget, lectus. Cras cursus, enim vitae facilisis interdum, leo nibh iaculis nulla, quis aliquam est tellus quis lectus. Curabitur laoreet. Duis blandit. Etiam in tortor.Sed pharetra blandit lectus. Pellentesque fringilla. Fusce rutrum aliquet purus. Proin ac lacus sed enim nonummy placerat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc posuere metus ac ipsum. Nulla mattis tellus a ipsum fringilla fringilla. In sed eros vitae tellus laoreet dignissim. Etiam porttitor, nunc nec porttitor ornare, turpis libero dictum odio, ut nonummy erat neque non ante. Suspendisse potenti. Aenean eleifend pretium eros.";
	$pdf->printTitle($title);
/*	for($i=0; $i<3; $i++){
		$pdf->printParagraph($text);
	}
	$pdf->printNote($text);
	$pdf->printParagraph($text);
	$pdf->printAttention($text);
	$pdf->printParagraph($text);
	$pdf->printQuote($text);
	$pdf->printParagraph($text);
	$pdf->printImage("documente/teste2/img/img1.png", "Parcul central Cluj-Napoca");
	$pdf->printParagraph($text);*/
	
	$THeader=array("Produs", "Pret", "Cantitate", "TVA", "451", "451");
	$TData=array();
	$TInfo="Parcul central Cluj-Napoca";
	$TData[0]=array("Mere", "10", "651", "451", "451", "461");
	$TData[1]=array("Pere", "150", "950", "4651", "451", "451");
	$TData[2]=array("Prune", "50", "458", "451", "451", "451");
	$TData[3]=array("Bananedfdsfsd sdf sdf s df sdfsdfsdfsdfsdfsdfsdf sdf sdfs df sd fs df sdfsdfsdfsdfsdsfsd sdfsd", "30", "475", "451", "451", "451");
	$TData[4]=array("Cocos", "80", "435", "451", "451", "451");
	$TData[5]=array("Kiwi", "20", "463", "451", "451", "451");
	$TData[6]=array("Cirese", "40", "845", "461", "451", "451");
	$TData[7]=array("Visine", "80", "945", "451", "451", "451");
	
	$pdf->printTable($THeader, $TData, $TInfo);
	
	$pdf->Output();
?>
